#ifndef COMPONENTSUPDATER_H_
#define COMPONENTSUPDATER_H_
#include <list>
#include "Component.h"

namespace Pantsu {

	class ComponentsUpdater {
	public:
		void UpdateComponents( float i_deltaTime ) {

			std::list<Component*>::iterator itr = m_Components.begin();

			for ( itr; itr != m_Components.end(); ++itr ) {
				
				(*itr)->Update( i_deltaTime );
			}
		}

		inline void AddComponent( Component *i_component ) {
			m_Components.push_back( i_component );
		}

	protected:
		std::list<Component*> m_Components;
	};
}

#endif